package com.tjsinfo.tjsoa.mail.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.tjsinfo.tjsoa.mail.bo.ITjsFoldMailBo;
import com.tjsinfo.tjsoa.mail.bo.ITjsemailReceivedBo;

public class EmailReceivedMoveAction extends Action{
	private ITjsemailReceivedBo tjsemailReceivedBo;
	public ITjsemailReceivedBo getTjsemailReceivedBo() {
		return tjsemailReceivedBo;
	}
	public void setTjsemailReceivedBo(ITjsemailReceivedBo tjsemailReceivedBo) {
		this.tjsemailReceivedBo = tjsemailReceivedBo;
	}
	@Override
	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		// TODO Auto-generated method stub
		String[] starray = request.getParameterValues("checkbox2");
		if (tjsemailReceivedBo.moveTjsReceived(starray,request.getParameter("flodid"))) {//收件列表			
				request.setAttribute("linkurl", "tjsinfo/tjsoa/mail/emailReceivedList.do");
				request.setAttribute("message", "email.message.movemail");
				return mapping.findForward("success");
		} else {
			return mapping.findForward("error");
		}
		
	}

}
